package com.ayit.car.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 汽车品牌商品表
 * @TableName models
 */
@TableName(value ="models")
public class Models implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 品牌ID
     */
    private Long brandId;

    /**
     * 车型名称
     */
    private String modelName;

    /**
     * 指导价格区间
     */
    private String priceRange;

    /**
     * 代表图片URL
     */
    private String representativeImage;

    /**
     * 评分，1~5分，乘10保存
     */
    private Integer rating;

    /**
     * 车型分类
     */
    private String category;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 创建人ID
     */
    private Long createUser;

    /**
     * 修改人ID
     */
    private Long updateUser;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 品牌ID
     */
    public Long getBrandId() {
        return brandId;
    }

    /**
     * 品牌ID
     */
    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    /**
     * 车型名称
     */
    public String getModelName() {
        return modelName;
    }

    /**
     * 车型名称
     */
    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    /**
     * 指导价格区间
     */
    public String getPriceRange() {
        return priceRange;
    }

    /**
     * 指导价格区间
     */
    public void setPriceRange(String priceRange) {
        this.priceRange = priceRange;
    }

    /**
     * 代表图片URL
     */
    public String getRepresentativeImage() {
        return representativeImage;
    }

    /**
     * 代表图片URL
     */
    public void setRepresentativeImage(String representativeImage) {
        this.representativeImage = representativeImage;
    }

    /**
     * 评分，1~5分，乘10保存
     */
    public Integer getRating() {
        return rating;
    }

    /**
     * 评分，1~5分，乘10保存
     */
    public void setRating(Integer rating) {
        this.rating = rating;
    }

    /**
     * 车型分类
     */
    public String getCategory() {
        return category;
    }

    /**
     * 车型分类
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 创建人ID
     */
    public Long getCreateUser() {
        return createUser;
    }

    /**
     * 创建人ID
     */
    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    /**
     * 修改人ID
     */
    public Long getUpdateUser() {
        return updateUser;
    }

    /**
     * 修改人ID
     */
    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Models other = (Models) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
            && (this.getModelName() == null ? other.getModelName() == null : this.getModelName().equals(other.getModelName()))
            && (this.getPriceRange() == null ? other.getPriceRange() == null : this.getPriceRange().equals(other.getPriceRange()))
            && (this.getRepresentativeImage() == null ? other.getRepresentativeImage() == null : this.getRepresentativeImage().equals(other.getRepresentativeImage()))
            && (this.getRating() == null ? other.getRating() == null : this.getRating().equals(other.getRating()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
        result = prime * result + ((getModelName() == null) ? 0 : getModelName().hashCode());
        result = prime * result + ((getPriceRange() == null) ? 0 : getPriceRange().hashCode());
        result = prime * result + ((getRepresentativeImage() == null) ? 0 : getRepresentativeImage().hashCode());
        result = prime * result + ((getRating() == null) ? 0 : getRating().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", brandId=").append(brandId);
        sb.append(", modelName=").append(modelName);
        sb.append(", priceRange=").append(priceRange);
        sb.append(", representativeImage=").append(representativeImage);
        sb.append(", rating=").append(rating);
        sb.append(", category=").append(category);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}